@import "~scss/variables";

.sw-select-selection-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    width: calc(100% - 30px);
    overflow: hidden;

    .sw-select-selection-list__item-holder {
        max-width: 220px;
        line-height: 0;
        margin: 8px 6px 0 0;
    }

    .sw-select-selection-list__load-more {
        margin-top: 8px;
    }

    button.sw-select-selection-list__load-more-button {
        padding: var(--scale-size-8) var(--scale-size-12);
        margin: 0 var(--scale-size-6) 0 0;
        color: var(--color-text-brand-default);
        font-size: $font-size-xxs;
        line-height: 14px;
        border-radius: var(--border-radius-xs);
        height: unset;
        border-color: var(--color-border-primary-default);
    }

    .sw-select-selection-list__input-wrapper {
        flex: 1 1 0;
        position: relative;
    }

    .sw-select-selection-list__input {
        float: right;
        display: inline-block;
        padding: 12px 16px 12px 8px;

        &::placeholder {
            color: var(--color-text-secondary-default);
            white-space: break-spaces;
        }
    }
}

.sw-field--medium .sw-select-selection-list {
    .sw-select-selection-list__item-holder .sw-label {
        margin: 4px 6px 0 0;
    }

    input {
        padding: 4px 16px 8px 8px;
    }

    .sw-select-selection-list__load-more-button {
        padding: 4px 12px;
        margin: 4px 6px 0 0;
    }
}

.sw-field--small .sw-select-selection-list {
    .sw-select-selection-list__item-holder .sw-label {
        margin: 4px 6px 0 0;
    }

    input {
        padding: 2px 16px 4px 8px;
    }

    .sw-select-selection-list__load-more-button {
        padding: 0 8px;
        margin: -1px 6px 0 0;
    }
}
